Virk had run for the seat of National Assembly on a ticket of Pakistan Muslim League-Quaid (PML-Q) from NA-97 (Gujranwala) in 2002 general elections but remained unsuccessful but he was elected as MNA on a ticket of PPML-N from same constituency in 2008 general elections. He was re-elected as MNA in 2013 elections.
The portfolio of law and justice ministry was lying vacant after the minister Zahid Hamid had to resign under an agreement between the PML-N government and the protesting leaders after the deadly clashes between police and protesters belonging to religious groups in November, 2017. The protesters had demanded his removal for changes in a law related to the Khatam-e-Nabuwat (finality of prophethood) oath in the Elections Act 2017.